package com.mofang.ticketing.base.mapping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author ChenDongDong
 * @version 1.0
 * @description 图片表
 * @createDate 2022/10/8 9:36
 */
@NoArgsConstructor
@Data
@TableName(value = "sys_attachment")
public class SysAttachmentDO {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 附件数据类型 0默认 1反馈图片AttachmentDataTypeEnum
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 关联ID 1关联反馈表
     */
    @TableField(value = "ref_id")
    private Integer refId;

    /**
     * 附件类型;1.图片、2音频、3视频、4其它
     */
    @TableField(value = "attachment_type")
    @ApiModelProperty(value = "附件类型;1.图片、2音频、3视频、4其它")
    private Integer attachmentType;

    /**
     * 附件地址
     */
    @TableField(value = "url")
    private String url;

    /**
     * 状态 0:失效 1有效 AttachmentStatusEnum
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    public SysAttachmentDO(Integer type, Integer refId, String url, Integer status) {
        this.type = type;
        this.refId = refId;
        this.url = url;
        this.status = status;
    }

}